;(function() {
    // 步骤3：创建echarts实例
    let myChart = echarts.init(document.querySelector('.box-m2'))

    // 步骤4：定义配置（指定图表的配置项和数据）
    let option = {
        
        title: {
            text: "就业",
            left: "center",
            top: -4,
            textStyle: {
              color: "#faff72",
            },
          },
          legend: {
            data: ['就业人数']
          },
          radar: {
            // shape: 'circle',
            top:20,
            indicator: [
              { name: '2015', max: 6500 },
              { name: '2016', max: 16000 },
              { name: '2017', max: 30000 },
              { name: '2018', max: 38000 },
              { name: '2019', max: 52000 },
              { name: '2020', max: 25000 }
            ]
          },
          series: [
            {
              name: '就业人数',
              type: 'radar',
              data: [
                {
                  value: [4832.5, 4850.22, 4872.8,4866.9, 4903.2,4893],
                  name: 'Allocated Budget'
                },
              ]
            }
          ]
    };

    // 步骤5：使用刚指定的配置项和数据显示图表
    myChart.setOption(option)

    // window.onresize = () => {
    //     myChart.resize()
    // }

    window.addEventListener('resize', () => {
        myChart.resize()
    })
})()